﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace NCHQMES
{
    /// <summary>
    /// 通用类
    /// </summary>
    [Serializable]
    public class CommonClass
    {
        /// <summary>
        /// 发送HEAD结构
        /// </summary>
        [Serializable]
        public class Common_WriteHead
        {
            public WriteHead HEAD = new WriteHead();
        }

        /// <summary>
        /// 接收HEAD结构
        /// </summary>
        [Serializable]
        public class Common_ReadHead
        {
            public ReadHead HEAD = new ReadHead();
        }

        /// <summary>
        ///MAIN结构通用类
        /// </summary>
        [Serializable]
        public class Common_Main : Common_EQSN
        {
            public Common_Main()
            {
                OperatorName = "";
                HostName = "";
                IP = "";
            }

            /// <summary>
            /// 实际的操作人员工号
            /// </summary>
            public string OperatorName = "";

            /// <summary>
            /// 设备的主机名
            /// </summary>
            public string HostName = "";

            /// <summary>
            /// IP
            /// </summary>
            public string IP = "";
        }

        /// <summary>
        ///MAIN结构中EQSN通用类
        /// </summary>
        [Serializable]
        public class Common_EQSN
        {
            public Common_EQSN()
            {
                EQSN = "";
            }

            /// <summary>
            /// 设备编号
            /// </summary>
            public string EQSN = "";
        }

        /// <summary>
        /// 接收Head
        /// </summary>
        [Serializable]
        public class ReadHead
        {
            /// <summary>
            /// 填实际的GUID值，全局唯一标识符
            /// </summary>
            public string H_GUID = "";

            /// <summary>
            /// 判断是否为00001，是则表示PASS，否则表示FAIL
            /// </summary>
            public string H_RET = "";

            /// <summary>
            /// 错误信息
            /// </summary>
            public string H_MSG = "";
        }

        /// <summary>
        /// 发送Head
        /// </summary>
        [Serializable]
        public class WriteHead
        {
            /// <summary>
            /// 填实际的GUID值，全局唯一标识符
            /// </summary>
            public string H_GUID = "";

            /// <summary>
            /// 预留字段，固定放空
            /// </summary>
            public string H_SRC_SYS = "";

            /// <summary>
            /// 接口名
            /// </summary>
            public string H_OP = "";

            /// <summary>
            ///固定Token
            /// </summary>
            public string H_TOKEN = "";
        }
    }
}